package com.zq.gmall.user.controller;


import com.zq.gmall.bean.UmsMember;
import com.zq.gmall.service.IUmsMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author zheng
 * @since 2020-02-15
 */
@Controller
@RequestMapping("/user/ums-member")
public class UmsMemberController {

    @Autowired
    IUmsMemberService iUmsMemberService;

    @RequestMapping("/selectAll")
    @ResponseBody
    public List<UmsMember> selectAll(){
        List<UmsMember> umsMembers = iUmsMemberService.selectAll();
        return umsMembers;
    }

    @RequestMapping("/selectById/{id}")
    @ResponseBody
    public UmsMember selectById(@PathVariable("id")String id){
        UmsMember umsMember = iUmsMemberService.selectById(id);
        return umsMember;
    }

}

